import { Module } from '@nestjs/common';
import { UserController } from './system/user/user.controller';
import { LoginController } from './login/login.controller';
import { ServiceModule } from '@src/module/service.module';
import { APP_GUARD } from '@nestjs/core';
import { AuthGuard } from '@src/shared/guard/auth.guard';
import { RoleController } from './system/role/role.controller';
import { AccessController } from './system/access/access.controller';
import { CategoryController } from './goods/category/category.controller';
import { FileModule } from '@src/module/file/file.module';
import { GoodsController } from '@src/controllers/admin/goods/goods/goods.controller';
import { OrderController } from '@src/controllers/admin/goods/order/order.controller';
import { StructController } from './system/struct/struct.controller';
import { DictController } from './system/dict/dict.controller';
import { LoggerController } from './system/logger/logger.controller';
import { TaskController } from './task/task.controller';

@Module({
  imports: [
    ServiceModule,
    FileModule,
  ],
  providers: [
    {
      provide: APP_GUARD,
      useClass: AuthGuard,
    },
  ],
  controllers: [
    UserController,
    StructController,
    DictController,
    LoginController,
    RoleController,
    AccessController,
    LoggerController,
    TaskController,
    CategoryController,
    GoodsController,
    OrderController
  ]
})
export class AdminModule { }
